
using JTZY.Model.Business;
using JTZY.Model.System;

namespace JTZY.Model.Order
{
    /// <summary>
    /// 退货单表
    /// </summary>
    [SugarTable("corecmsbillaftersales")]
    public class Corecmsbillaftersales
    {
        /// <summary>
        /// 售后单id 
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
        public string AftersalesId { get; set; }

        /// <summary>
        /// 订单ID 
        /// </summary>
        public string OrderId { get; set; }

        /// <summary>
        /// 用户ID 
        /// </summary>
        public long UserId { get; set; }

        /// <summary>
        /// 售后类型 
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// 退款金额 
        /// </summary>
        public decimal RefundAmount { get; set; }

        /// <summary>
        /// 状态 
        /// </summary>
        public int Status { get; set; }

        /// <summary>
        /// 退款原因 
        /// </summary>
        public string Reason { get; set; }

        /// <summary>
        /// 卖家备注，如果审核失败了，会显示到前端 
        /// </summary>
        public string Mark { get; set; }

        /// <summary>
        /// 提交时间 
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 更新时间 
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 退货方式 
        /// </summary>
        public string ReMethod { get; set; }
        /// <summary>
        ///  0 买错退货 1 质量退货 2 滞销退货  3 质量换货
        /// </summary>
        public string RetReasons { get; set; }


        /// <summary>
        /// 0销售订单  1 采购订单 
        /// </summary>
        public string SourceType { get; set; }
        /// <summary>
        /// 退款状态
        /// </summary>
        public int PayStatus { get; set; }
        /// <summary>
        /// 退款时间
        /// </summary>
        public DateTime? PayTime { get; set; }
        /// <summary>
        /// 售后进度
        /// </summary>
        public int AfterProgress { get; set; }
        /// <summary>
        /// 换货签收时间
        /// </summary>
        public DateTime? ReceiveTime { get; set; }

        public DateTime? ShipTime { get; set; }


        [Navigate(NavigateType.OneToOne, nameof(UserId), nameof(Corecmsuser.Id))]//变量名不要等类名 
        public Corecmsuser User { get; set; }

        [Navigate(NavigateType.OneToMany, nameof(Corecmsbillaftersalesitem.AftersalesId), nameof(AftersalesId))] //自定义关系映射
        public List<Corecmsbillaftersalesitem> CorecmsbillaftersalesitemNav { get; set; }

        [Navigate(NavigateType.OneToMany, nameof(Corecmsbillaftersalesimages.AftersalesId), nameof(AftersalesId))] //自定义关系映射
        public List<Corecmsbillaftersalesimages> Images { get; set; }

        [SugarColumn(IsIgnore = true)]
        public Corecmsorder order { get; set; }
        public int StoreId { get; set; }

        [SugarColumn(IsIgnore = true)]
        public List<Corecmsbillaftersalesitem> Items { get; set; }
        /// <summary>
        /// 客户退货单号
        /// </summary>
        public string  OldaftersalesId { get; set; }

    }
}